package com.shop.cereshop.app.dl.logic.controller;

import com.shop.cereshop.app.dl.logic.service.CereShopAnnouncementService;
import com.shop.cereshop.app.dl.logic.utils.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 况鑫威
 * @Date: 2021/7/22
 * @Time: 16:17
 * @ClassName: CereShopAnnouncementController
 * @Description: com.shop.cereshop.business.dl.logic.controller
 */
@RestController
@RequestMapping("announcement")
public class CereShopAnnouncementController {
    @Autowired
    private CereShopAnnouncementService cereShopAnnouncementService;

    /**
     * 功能描述: 获取公告
     * @Param: [announcementType:类型]
     * @return: com.shop.cereshop.app.dl.logic.utils.ResultInfo<?>
     * @Author: 况鑫威
     * @Date: 2021/7/29
     * @Time: 9:29
     */
    @PostMapping("getAnnouncements")
    public ResultInfo<?> getAnnouncements(String announcementType) {
        return new ResultInfo<>(cereShopAnnouncementService.getAnnouncements(announcementType));
    }
}
